home *** CD-ROM | disk | FTP | other *** search
- /* Quick_Envelope
- A Macro by Steven. R. Giovenella, 5823 Dutchess Dr., Colorado Springs, CO 80918.
- © Copyright 1994 Steven. R. Giovenella, All rights reserved.
- This macro is my gift to the Amiga community. It may be given away free to
- anyone, but it may NOT be sold in any way, shape, or form, not even for the cost of
- reproduction, downloading, shipping, or handling, without express written
- permission from the author listed above. Any person or company who violates the
- content of the previous sentence, agrees to pay Steven R. Giovenella $1,000 (US) for
- each copy of this macro sold. This macro may NOT be added to any disk which is to
- be sold for any price or fee, to include shipping and handling. The ONLY way this
- macro may be distributed is on a disk which is given away 100% free of all charges,
- or on via telecommunications networks which do not charge any additional fee as a
- result of a user downloading this particular macro. This macro may only be
- reproduced in its entirety, including all comment lines and code. The individual
- user may alter this macro for personal use, but may not then distribute the macro
- in any modified form. If you wish, feel free to send me some cash, a Christmas card,
- some other piece of software, or absolutely nothing as a gift for creating this macro.
- The author of this software is not responsible for any data loss or damage to
- computer equipment as a result, direct or indirect, of the use of this macro. */
-
- Options Results
-
- /* Determine if using a highlighted or a custom address */
- Status LinePos
- Coords = Result
- PARSE VAR Coords BegLine BegPos EndLine EndPos
- If EndLine="" Then DO
- CustomFlag=1
- Endline=Begline
- END
- AddressLength = EndLine - BegLine
-
- /* If custom, Request Address */
- IF CustomFlag=1 THEN DO
- DO i = 1 to 6
- RequestText '"Custom Address (Line 'i' of 6)" "Enter text" ""'
- If Result = "" Then Result = " "
- address.i = Result
- END
- type " "
- backspace
- END
-
- /* Highted data interpreter */
- MoveToLine BegLine BegPos
- ShiftDOWN
- CtrlDOWN
- AltDOWN
- MoveToLine EndLine EndPos
- Copy
- ShiftUP
- AltUp
- CtrlUP
-
- /* Check to see if no document is open
- Status FileName
- IF Result = "" THEN flag = 1 */
-
- /* Open Envelope Template */
- RequestText '"Select Envelope Template to print on..." "Enter the template
- name..." "Template_BusinessEnvelope"'
- template = Result
- file = "FWDocs/" || template
- Open file
- DO delay=1 to 2000
- END
- altdown
- ctrldown
- cursordown
-
- /* Switch ARexx ports */
- Status PortName
- port = Result
- portnumber = RIGHT(port,1) + 1
- newport = "FINALW." || portnumber
- IF flag =1 THEN newport = "FINALW.1"
- ADDRESS VALUE newport
-
- /* Paste or Write Addess */
- altdown
- ctrldown
- cursor down
- Status LinePos
- coords = Result
- PARSE VAR coords Line Pos
- copyruler
- If CustomFlag = 1 Then Call SkipPaste
- Paste
- Do i = 0 to addresslength
- MoveToLine (Line+i) Pos
- pasteruler
- End
- Print PROMPT
- Close FORCE
- EXIT
-
- SkipPaste:
- DO i = 1 to 6
- type address.i
- newparagraph
- END
- Do i = 0 to addresslength
- MoveToLine (Line+i) Pos
- pasteruler
- End
- Print PROMPT
- Close FORCE
- EXIT
-
-